<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/views/_linkPages/basePath.jsp" %>
<!DOCTYPE html>
<%--我的信息--%>
<!-- saved from url=(0045)http://www.maomijiaoyi.com/index.php?/usermsg -->
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>猫咪交易网,我的信息-我的消息</title>
    <meta name="keywords" content="宠物猫,买猫,卖猫,宠物猫交易,宠物猫价格">
    <meta name="description"
          content="猫咪交易网(www.maomijiaoyi.com)行业购宠第一品牌，千万家卖猫商家入驻覆盖全国各地，买放心宠物猫、了解最全面的宠物猫价格就上猫咪交易网、12年品牌值得信赖！">

    <link rel="stylesheet" href="${basePath}jsp/hs/css/usercenter.css">
    <link rel="stylesheet" href="${basePath}jsp/hs/css/comment.css">
    <script src="${basePath}jsp/hs/js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="${basePath}jsp/hs/js/comment.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>

<!-- 引入公共头部 -->
<!-- 网页头部 -->
<%@ include file="cat/head.jsp"%>

<div style="height: 80px;"></div>

<!-- 面包屑导航栏 Crumbs_nav-->
<div id="Crumbs_nav">
    <a target="_blank" href="http://localhost:8080/jsp/hs/index.jsp">首页 &gt;</a>

    <a href="http://localhost:8080/jsp/hs/message.jsp"><span>我的消息</span></a>
</div>


<!-- 个人中心 user_box-->
<div id="user_box" style="border: #eee solid 3px; box-sizing: border-box;">

    <!-- 左侧侧边栏 -->
    <div id="left_side">

        <a href="http://localhost:8080/jsp/hs/personal.jsp">
            <img src="${basePath}jsp/hs/img/userinfo.png" alt="">
            <p>个人信息</p>
        </a>

        <a href="http://localhost:8080/jsp/hs/modify.jsp">
            <img src="${basePath}jsp/hs/img/xiugai_zl.png" alt="">
            <p>修改资料</p>
        </a>

        <a href="http://localhost:8080/jsp/hs/password.jsp">
            <img src="${basePath}jsp/hs/img/xiugai_pwd.png" alt="">
            <p>修改密码</p>
        </a>

        <a href="${basePath}head?method=tomypostPage&username=${user.username}">
            <img src="${basePath}jsp/hs/img/my_post.png" alt="">
            <p>我的帖子</p>
        </a>

        <a href="http://localhost:8080/jsp/hs/message.jsp" style="background: rgba(56,50,50,0.2);">
            <img src="${basePath}jsp/hs/img/system_news.png" alt="">
            <p>系统信息</p>
        </a>

    </div>

    <!-- 右侧信息展示 -->
    <div id="right_infobox">

        <!-- 我的消息 -->
        <div id="my_msg">我的消息</div>

        <!-- 消息列表 -->
        <div id="msg_list">


        </div>

    </div>

</div>

<div style="height: 80px;"></div>

<!-- 引入公共尾部 -->
<!-- 网页底部 -->
<div id="footer">

    <div class="logo">
        <div class="logo_kuang">
            <div>
                <a href="http://localhost:8080/jsp/hs/index.jsp">
                    <img alt="猫咪交易网" title="猫咪交易网" src="${basePath}jsp/hs/img/logo.png">
                </a>
            </div>
        </div>
    </div>


    <div class="banquan">
        <div class="center_1220">
            版权所有：猫咪交易网 www.maomijiaoyi.com 友情链接互换:qq 3416807849
        </div>
    </div>

    <div class="banquan">
        <div class="center_1220">
            【免责声明：本站所有猫猫交易信息内容系用户自行发布，其真实性、合法性由发布人负责，本站不提供任何保证，亦不承担任何法律责任！】
        </div>
    </div>

    <div class="banquan">
        <div class="center_1220">
            <a style="color: #FFF;" href="http://www.beian.gov.cn/portal/registerSystemInfo" target="_blank">
                <img src="${basePath}jsp/hs/img/foot_link3.png">
                沪ICP备18022709号-1 </a>
        </div>
    </div>

</div>

<script type="text/javascript">

    $(document).ready(function () {

        $('.listBox .img_show').click(function () {
            var flag = $(this).parent().find(".msg_con").css("display") == 'block';
            var btnText = "查看";
            var show = "none";
            var $parent = $(this).parent();
            if (!flag) {


                var abcd = $(this).parent().attr('class');
                console.log(abcd);

                btnText = "关闭";
                show = "block";

                if ($(this).parent().attr('stat') == 0) {

                    var data = {mid: $(this).parent().attr('m_id')}

                    $.post('/index.php?/admin/main/changeMsgsta', data, function (rst) {

                        try {

                            var obj = eval('(' + rst + ')');

                            if (obj.stat == true) {

                                console.log('修改成功');
                                $parent.attr('stat', '1');
                                $parent.find('.is_read').html('已读');
                                $parent.find('.is_read').css("background", "green");
                            } else console.log('修改失败！');

                        } catch (e) {

                            console.log('修改失败！');
                        }

                    });

                }

            }

            $('.msg_con').css('display', 'none');
            $(".img_show").html("查看");
            $(this).parent().find(".msg_con").css("display", show);
            $(this).parent().find(".img_show").html(btnText);

        });

        $('.listBox .del_msg').click(function () {

            if (confirm('确定要删除吗?此操作不可恢复'))
                var data = {mid: $(this).parent().attr('m_id')}

            var $li = $(this).parent();

            $.post('/index.php?/admin/main/delMsg', data, function (rst) {

                try {

                    var obj = eval('(' + rst + ')');

                    if (obj.stat == true) {

                        $li.remove();

                        console.log('删除成功！');

                    } else {

                        console.log('删除失败！')

                    }

                } catch (e) {

                    console.log('删除失败！')

                }

            });

        });

    });

</script>


</body>
</html>